package com.qf.smartdevice.controller;

import com.qf.smartdevice.dot.Result;
import com.qf.smartdevice.pojo.SysScene;
import com.qf.smartdevice.service.SysSceneService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author 王博康
 * @version 1.0
 * @project devicemanagementsystem
 * @description: TODO
 * @date 2022/3/22 16:39 星期二
 */
@RestController
@RequestMapping("/scene")
public class SysSceneController {

    private SysSceneService sysSceneService;

    @Autowired
    public void setSysSceneService(SysSceneService sysSceneService) {
        this.sysSceneService = sysSceneService;
    }

    @PostMapping("/scene")
    public Result addScene(@RequestBody SysScene sysScene){
        return Result.setOk();
    }

    @GetMapping("/scene/{id}")
    public Result findById(@PathVariable Long id){
        SysScene sysScene=sysSceneService.findById(id);
        return Result.setOk(sysScene);
    }
}
